<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('username')->comment("用户名称");
            $table->string('password')->comment("用户密码");
            $table->string('email')->comment("用户邮箱");
            $table->string("image")->comment("用户图像");
            $table->integer('mobile')->comment("用户手机号");
            $table->tinyInteger("sex")->comment("用户性别");
            $table->string('ip')->comment("用户IP");
            $table->tinyInteger('is_open')->default('1')->comment("是否屏蔽用户，1开启，2屏蔽");
            $table->tinyInteger('disabled')->default('1')->comment("是否伪删除，1正常，2删除");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user');
    }
}
